package com.example.hellonotes;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class BaseContentAdapter<T> extends BaseAdapter {

	protected Context mContext;
	protected List<T> dataList ;
	
	public List<T> getDataList() {
		return dataList;
	}
	
	public void setDataList(List<T> dataList) {
		this.dataList = dataList;
	}
	
	public BaseContentAdapter(Context context,List<T> list){
		mContext = context;
		dataList = list;
	}
	
	@Override
	public int getCount() {
		// TODO 自动生成的方法存根
		return dataList.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO 自动生成的方法存根
		return dataList.get(position);
	}

	@Override
	public long getItemId(int position) {
		// TODO 自动生成的方法存根
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO 自动生成的方法存根
		 return getConvertView(position,convertView,parent);

}
	public abstract View getConvertView(int position, View convertView, ViewGroup parent);
}
	
